/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.cocoserver.model.manager;

import com.cocoserver.model.connectr.ClientThread;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author AIDEN
 */
public class ManageClientThread {

    private static HashMap<String,ClientThread> clientMap = new HashMap<String,ClientThread>();

    static public void addClientThread(String id,ClientThread cThread){
        ManageClientThread.clientMap.put(id, cThread);
        System.out.println("add:"+id);
    }

    static public ClientThread gerClientThread(String String){
        return (ClientThread)ManageClientThread.clientMap.get(String);
    }

    static public HashMap<String, ClientThread> getClientMap() {
        return clientMap;
    }

    static public void removeThread(String id){
//            gerClientThread(id).getUserSocket().close();
        ManageClientThread.clientMap.remove(id);
    }

}
